package com.zbf.tspring.lanjieqi;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

/**
 * @author: LCG
 * 作者: LCG
 * 日期: 2020/10/29  10:53
 * 描述:
 */
public class MyInterceptorConfig extends WebMvcConfigurationSupport {

    @Autowired
    private MyINtercepter myINtercepter;

    @Override
    protected void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(myINtercepter).addPathPatterns("/user/**");
    }
}
